<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>前端监控</title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/normalize/8.0.1/normalize.css">
    <link rel="stylesheet" href="https://cdn.bootcss.com/minireset.css/0.0.2/minireset.css">
    <link rel="stylesheet" href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.css">
</head>

<body>
    <link rel="stylesheet" href="./style.css">
    <script>
        unWatch.init({
            time: 10000,
            callback: (data) => {
                console.log(data)
                new Image().src = 'http://localhost:3000/report?' + JSON.stringify(data);
            }
        });
    </script>
    <h1>SayHi()</h1>
    <script src="https://cdn.bootcss.com/socket.io/2.2.0/socket.io.js"></script>
    <script src="https://cdn.bootcss.com/echarts/4.2.1-rc1/echarts.min.js"></script>
    <script src="https://cdn.bootcss.com/vue/2.6.10/vue.js"></script>
    <script src="https://unpkg.com/axios@0.19.0/dist/axios.min.js"></script>
    <!-- 不存在此图片 只是测试异常监听 -->
    <img src="./example.png" alt="">
    <!-- 不存在此文件 只是测试异常监听 -->
    <script src="./example.js"></script>
    <script>

        // 测试
        setTimeout(() => {
            let el = document.createElement('img');
            // 不存在此图片 只是测试异常监听
            el.setAttribute('src', './example.png');
            document.body.append(el);
            // 不存在此接口 只是测试异常监听
            axios.get('http://localhost:3000/test').then(res => {
                console.log(res)
            })
        }, 5000)
        console.log(test)
    </script>
</body>

</html>